#include "socialknowledge.h"

namespace IAlib
{
    SocialKnowledge::SocialKnowledge()
    {
        IAlib::Knowledges::setType(IAlib::Knowledges::SocialKnowledge);
        IAlib::Knowledges::setLastCheck(0);
    }

    SocialKnowledge::SocialKnowledge(const SocialKnowledge& knowledge)
    {
        if (knowledge.getType() == IAlib::Knowledges::SocialKnowledge)
        {
            IAlib::Knowledges::setType(IAlib::Knowledges::SocialKnowledge);
            m_actor_id = knowledge.m_actor_id;
            m_actor_role = knowledge.m_actor_role;
            m_actor_state = knowledge.m_actor_state;
            m_actor_position = knowledge.m_actor_position;
            m_data = knowledge.m_data;
            setLastCheck(knowledge.getLastCheck());
        }
        else
        {
            IAlib::Knowledges::setType(IAlib::Knowledges::SocialKnowledge);
            IAlib::Knowledges::setLastCheck(0);
        }
    }



    void SocialKnowledge::setActorPosition(const float x, const float y, const float z, const QString &work_space_id)
    {
        m_actor_position.m_x = x;
        m_actor_position.m_y = y;
        m_actor_position.m_z = z;
        m_actor_position.setWorkSpaceId(work_space_id);
    }

    QByteArray SocialKnowledge::toByteArray() const
    {
        QByteArray array;
        return array;
    }
    void SocialKnowledge::fromByteArray(QByteArray &byte_array)
    {

    }
}
